include( "shared.lua" );

ENT.Spawnable			= false;
ENT.AdminSpawnable		= false;
ENT.RenderGroup 		= RENDERGROUP_OPAQUE;

function ENT:Initialize()
	
	C.ClearLinks( self );
	
end

function ENT:CheckLinks()
	
	for k, v in pairs( self.Links ) do
		
		if( !v or !v:IsValid() ) then
			
			table.remove( self.Links, k );
			continue;
			
		end
		
		if( v:GetPos():Distance( self:GetPos() ) > 1024 ) then
			
			table.remove( self.Links, k );
			
		end
		
	end
	
end

function ENT:Think()
	
	self:CheckLinks();
	
end

function ENT:Draw()
	
	self:DrawModel();
	
end